package com.luyuan.gallery.service.impl;

import java.util.List;
import com.luyuan.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.luyuan.gallery.mapper.ExhiGalleryLikeMapper;
import com.luyuan.gallery.domain.ExhiGalleryLike;
import com.luyuan.gallery.service.IExhiGalleryLikeService;

/**
 * 展厅点赞记录Service业务层处理
 * 
 * @author luyuan
 * @date 2025-11-13
 */
@Service
public class ExhiGalleryLikeServiceImpl implements IExhiGalleryLikeService {
    @Autowired
    private ExhiGalleryLikeMapper exhiGalleryLikeMapper;

    /**
     * 查询展厅点赞记录
     * 
     * @param id 展厅点赞记录主键
     * @return 展厅点赞记录
     */
    @Override
    public ExhiGalleryLike selectExhiGalleryLikeById(Long id) {
        return exhiGalleryLikeMapper.selectExhiGalleryLikeById(id);
    }

    /**
     * 查询展厅点赞记录列表
     * 
     * @param exhiGalleryLike 展厅点赞记录
     * @return 展厅点赞记录
     */
    @Override
    public List<ExhiGalleryLike> selectExhiGalleryLikeList(ExhiGalleryLike exhiGalleryLike) {
        return exhiGalleryLikeMapper.selectExhiGalleryLikeList(exhiGalleryLike);
    }

    /**
     * 新增展厅点赞记录
     * 
     * @param exhiGalleryLike 展厅点赞记录
     * @return 结果
     */
    @Override
    public int insertExhiGalleryLike(ExhiGalleryLike exhiGalleryLike) {
        exhiGalleryLike.setCreateTime(DateUtils.getNowDate());
        return exhiGalleryLikeMapper.insertExhiGalleryLike(exhiGalleryLike);
    }

    /**
     * 修改展厅点赞记录
     * 
     * @param exhiGalleryLike 展厅点赞记录
     * @return 结果
     */
    @Override
    public int updateExhiGalleryLike(ExhiGalleryLike exhiGalleryLike) {
        exhiGalleryLike.setUpdateTime(DateUtils.getNowDate());
        return exhiGalleryLikeMapper.updateExhiGalleryLike(exhiGalleryLike);
    }

    /**
     * 批量删除展厅点赞记录
     * 
     * @param ids 需要删除的展厅点赞记录主键
     * @return 结果
     */
    @Override
    public int deleteExhiGalleryLikeByIds(Long[] ids) {
        return exhiGalleryLikeMapper.deleteExhiGalleryLikeByIds(ids);
    }

    /**
     * 删除展厅点赞记录信息
     * 
     * @param id 展厅点赞记录主键
     * @return 结果
     */
    @Override
    public int deleteExhiGalleryLikeById(Long id) {
        return exhiGalleryLikeMapper.deleteExhiGalleryLikeById(id);
    }
}
